.class public final Lnbisdk/on;
.super Lnbisdk/fs;


# instance fields
.field private buf:[B

.field private ue:I

.field private uf:I


# direct methods
.method public constructor <init>(Lnbisdk/ou;I)V
    .locals 2

    const/4 v1, 0x0

    invoke-direct {p0, p1}, Lnbisdk/fs;-><init>(Lnbisdk/ou;)V

    new-array v0, p2, [B

    iput-object v0, p0, Lnbisdk/on;->buf:[B

    iput v1, p0, Lnbisdk/on;->ue:I

    iput v1, p0, Lnbisdk/on;->uf:I

    return-void
.end method

.method private c([BII)I
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lnbisdk/rp;
        }
    .end annotation

    const/4 v5, 0x0

    move v0, p2

    move-object v1, p1

    move-object v2, p0

    :goto_0
    iget v3, v2, Lnbisdk/on;->ue:I

    if-lez v3, :cond_0

    iget v3, v2, Lnbisdk/on;->ue:I

    invoke-static {v3, p3}, Ljava/lang/Math;->min(II)I

    move-result v3

    iget-object v4, v2, Lnbisdk/on;->buf:[B

    iget v5, v2, Lnbisdk/on;->uf:I

    invoke-static {v4, v5, v1, v0, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget v0, v2, Lnbisdk/on;->ue:I

    sub-int/2addr v0, v3

    iput v0, v2, Lnbisdk/on;->ue:I

    iget v0, v2, Lnbisdk/on;->uf:I

    add-int/2addr v0, v3

    iput v0, v2, Lnbisdk/on;->uf:I

    return v3

    :cond_0
    iget v3, v2, Lnbisdk/on;->ue:I

    if-lez v3, :cond_1

    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "fill requires empty buffer"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_1
    iget-object v3, v2, Lnbisdk/on;->buf:[B

    iget-object v4, v2, Lnbisdk/on;->buf:[B

    array-length v4, v4

    invoke-super {v2, v3, v5, v4}, Lnbisdk/fs;->b([BII)I

    move-result v3

    iput v3, v2, Lnbisdk/on;->ue:I

    iput v5, v2, Lnbisdk/on;->uf:I

    goto :goto_0
.end method


# virtual methods
.method protected final b([BII)I
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lnbisdk/rp;
        }
    .end annotation

    invoke-direct {p0, p1, p2, p3}, Lnbisdk/on;->c([BII)I

    move-result v0

    return v0
.end method

.method public final close()V
    .locals 1

    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/on;->buf:[B

    invoke-super {p0}, Lnbisdk/fs;->close()V

    return-void
.end method
